﻿Global.namespace("System.Core.UI");
System.Core.UI.Menu=function(config){
    System.Core.UI.Menu.superclass.constructor.call(this,config);
};
Global.extend(System.Core.UI.Menu, System.Core.UI.Repeater,{
    menuItemSelector:'',
    activeItemCss:'',
    itemCss:'',
    onItemMouseOver:function(menuItem){},
    onItemMouseOut:function(menuItem){},
    onItemMouseClicked:function(menuItem){},
    onRendered:function(){
        
        if(this.menuItemSelector.length<=0){ return;}
        var ctr=this;
        $(this.menuItemSelector).bind('click',function(){ctr.onItemMouseClicked($('#'+this.id)[0]);});
        $(this.menuItemSelector).bind('mouseover',function(){ctr.onItemMouseOver($('#'+this.id)[0]);});
        $(this.menuItemSelector).bind('mouseout',function(){ctr.onItemMouseOut($('#'+this.id)[0]);});
    }
});